import 'package:citiesocial/beans/category_entity.dart';

class CategoryEntity2 {
  String cat_id, level, cat_name, cat_icon;
  List<CategoryEntity> child_cat;

  CategoryEntity2.fromJson(dynamic json) {
    if (json != null && json is Map) {
      cat_id = json['cat_id'];
      level = json['level'];
      cat_icon = json['cat_icon'];
      cat_name = json['cat_name'];
      var children = json['child_cat'] as List ?? [];
      child_cat = List();
      for (dynamic g in children) {
        child_cat.add(CategoryEntity.fromJson(g));
      }
    }
  }

  // @override
  // String toString() => '{cat_id=$cat_id, level=$level, cat_name=$cat_name}';
}
